package com.smart.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_user")
public class Users implements Serializable {

    private static  final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long uid;
    private String openid;
    private String username;
    private String password;
    private String realname;
    private String sex;
    private String money;
    private String telephone;
    private Date logintime;
    private String loginaddress;
    private String loginip;
    private Date registertime;
    private String avatar;
    private Integer status;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

}
